package com.lpf.方法引用与构造器引用;

import java.util.function.Function;

import org.junit.Test;

import com.lpf.common.Employee;

@SuppressWarnings("ALL")
public class ArrayRef {

	@Test
	public void test1() {
		Function<Integer, String[]> fun = (args) -> new String[args];
		String[] strs = fun.apply(10);
		System.out.println(strs.length);

		System.out.println("--------------------------");

		Function<Integer, Employee[]> fun2 = Employee[]::new;
		Employee[] emps = fun2.apply(20);
		System.out.println(emps.length);
	}
}
